using System;

namespace Axe.Conversions.CustomConverters
{
    internal class LongToByteConverter : Conversion<long, byte[]>
    {
        #region Conversion<long,byte[]> Members

        public override byte[] ForwardConvert(long instance)
        {
            return BitConverter.GetBytes(instance);
        }

        public override long ReverseConvert(byte[] instance)
        {
            return BitConverter.ToInt64(instance, 0);
        }

        #endregion
    }
}